package dao;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import pojo.ClassCourseM;

import java.util.List;

@Repository
public interface DesignClassCourseMapper {


    @Select("select * from class_course_m")
    List<ClassCourseM> getClassCourse();

    @Select("select * from class_course_m where grade = #{grade}")
    List<ClassCourseM> getOne(Integer grade);

    @Insert("insert into class_course_m (id,grade,major,year,term,select_course) values (#{id},#{grade},#{major},#{year},#{term},#{selectCourse})")
    Integer insert(ClassCourseM classCourseM);

    @Delete("delete from class_course_m where id=#{id}")
    Integer delete(String id);

}
